package com.liy.framework.common.mybatis.service.impl;

import com.liy.framework.common.mybatis.dao.UserMapper;
import com.liy.framework.common.mybatis.entity.User;
import com.liy.framework.common.mybatis.service.UserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service
public class UserServiceImpl implements UserService {

    @Autowired
    private UserMapper userMapper;

    public void insert(User entity) {
        this.userMapper.insertSelective(entity);
    }

    public void insertSelective(User entity) {
        this.userMapper.insertSelective(entity);
    }

    public User selectById(Object id) {
        return this.userMapper.selectById(id.toString());
    }
}
